package cn.shyouchi.wuguanjia.android.ui.event;

import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import cn.shyouchi.wuguanjia.android.R;
import cn.shyouchi.wuguanjia.android.model.EventInfoModel;

/**
 * Created by Eenie on 2016/10/17 at 15:16
 * Email: 472279981@qq.com
 * Des:
 */

public class EventInfoAdapter extends BaseQuickAdapter<EventInfoModel,BaseViewHolder> {
    EventCompileContract.View mView;

    public EventInfoAdapter(List<EventInfoModel> data, EventCompileContract.View view) {

        super(R.layout.item_event_setting, data);
        this.mView = view;
    }

    @Override
    protected void convert(BaseViewHolder holder, final EventInfoModel model) {


        holder.setText(R.id.model_name, model.getName());
        holder.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mView.infoItemClick(model);
            }
        });




    }





}
